Post

Replies

Boosts

Views

Activity

Reply to Path must be an absolute path: <> cannotCreateNode(path: "")
We are using roompaln api once data is capture CapturedRoom (this is in code finalResult). Then we are trying to save usdz file in file manager. Sometimes is working but sometimes we are getting like below Warning: in SdfPath at line 151 of sdf/path.cpp -- Ill-formed SdfPath </9EE71ED0F8D6415496A7B9F0C3671DB0321>: syntax error Coding Error: in _IsValidPathForCreatingPrim at line 3338 of usd/stage.cpp -- Path must be an absolute path: <> cannotCreateNode(path: "/9EE71ED0F8D6415496A7B9F0C3671DB0321")``` ```language This is that code we are using for shaving CapturedRoom data func saveFileLocal() { if let finalResult { let fm = FileManager.default let documentsURL = fm.urls(for: .documentDirectory, in: .userDomainMask).first! //let documentsURL = URL.documentsDirectory let fileName = "\(UUID().uuidString).usdz" let fileURL = documentsURL.appendingPathComponent(fileName) do { try finalResult.export(to: fileURL) } catch { print(error) } } }``` Please help us.
Oct ’23
Reply to Path must be an absolute path: <> cannotCreateNode(path: "")
We are trying to save usdz file in file manager some time its saved but some time we are getting the error. Like: path.absoluteURL file:///var/mobile/Containers/Data/Application/6D14A430-47B4-45F2-9D0D-6C31588A6A03/Documents/2896837C-C7E0-4FA8-BFE2-21A59B26D801.usdz Warning: in SdfPath at line 151 of sdf/path.cpp -- Ill-formed SdfPath </2896837CC7E04FA8BFE221A59B26D801>: syntax error Coding Error: in _IsValidPathForCreatingPrim at line 3338 of usd/stage.cpp -- Path must be an absolute path: <> cannotCreateNode(path: "/2896837CC7E04FA8BFE221A59B26D801") `` func saveFileLocal() { if let finalResult { let fm = FileManager.default var path = fm.urls(for: .documentDirectory, in: .userDomainMask).first! let fileName = "(UUID().uuidString).usdz" path.appendPathComponent(fileName) do { try finalResult.export(to: path.absoluteURL) } catch{ print(error) } } } func removeFiles() { var filePath = "" let fm = FileManager.default let path = fm.urls(for: .documentDirectory, in: .userDomainMask).first! do{ let content = try fm.contentsOfDirectory(atPath: path.path) for c in content{ filePath = path.appendingPathComponent(c).absoluteString if let url = URL(string: filePath){ try fm.removeItem(at: url) } } } catch{ print(error) } }
Sep ’23